import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import menu from '@/components/menu'
import echarts from '@/components/echarts/echarts'
import rk_manage from '@/components/warehouse/rk_manage'
import Procurement from '@/components/procurement/procurement'
import demandOrderDetails from '@/components/procurement/demandOrderDetails'
import distributionDemandOrder from '@/components/procurement/distributionDemandOrder'
import editDemandList from '@/components/procurement/editDemandList'
import newDemandOrder from '@/components/procurement/newDemandOrder'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/menu',
      name: 'menu',
      component: menu,
      children: [
        {
          path: 'echarts',
          name: 'echarts',
          component: echarts
        },
        {
          path: 'rk_manage',
          name: 'rk_manage',
          component: rk_manage
        },
        // 采购
        {
          path: 'procurement',
          component: Procurement
        },
        //新增需求单
        {
          path: 'newDemandOrder',
          component: newDemandOrder
        },
        //编辑需求单
        {
          path: 'editDemandList',
          component: editDemandList
        },

        //需求单详情
        {
          path: 'demandOrderDetails',
          component: demandOrderDetails
        },
        //分配需求单
        {
          path: 'distributionDemandOrder',
          component: distributionDemandOrder
        },

      ]
    },

  ]
})
